package cn.fj.big.spring.http.invoker.demo.config;

import cn.fj.big.spring.http.invoker.demo.api.ITestService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter;

/**
 * Created by LiJianXin on 2019/2/27 0027.
 */
@Configuration
public class ServerConfiguration {

	@Bean("/testService")
	public HttpInvokerServiceExporter testService(ITestService testService) {
		HttpInvokerServiceExporter httpInvokerServiceExporter = new HttpInvokerServiceExporter();
		httpInvokerServiceExporter.setService(testService);
		httpInvokerServiceExporter.setServiceInterface(ITestService.class);
		return httpInvokerServiceExporter;
	}
}
